package com.ruoyi.project.system.home.utils;

import com.github.pagehelper.PageInfo;
import com.ruoyi.project.system.home.domain.MiniPageResult;

public class PageUtils {
    public static MiniPageResult getPageResult(PageInfo<?> pageInfo) {
        MiniPageResult miniPageResult = new MiniPageResult();
        miniPageResult.setPageNum(pageInfo.getPageNum());
        miniPageResult.setPageSize(pageInfo.getPageSize());
        miniPageResult.setTotalSize(pageInfo.getTotal());
        miniPageResult.setTotalPages(pageInfo.getPages());
        miniPageResult.setContent(pageInfo.getList());
        return miniPageResult;
    }
}
